package hdf5.gui;

import hdf5.gui.listeners.*;

import javax.swing.*;

public class MenuButtonBar extends JToolBar {

    public MenuButtonBar() {

        JButton stopAnimationButton = new JButton("Stop");
        StopActionListener stopActionListener = new StopActionListener();
        stopAnimationButton.addActionListener(stopActionListener);

        JButton startAnimationButton = new JButton("Start");
        startAnimationButton.addActionListener(new StartActionListener(stopActionListener));

        JButton previousStepButton = new JButton("Previous");
        previousStepButton.addActionListener(new PreviousActionListener());

        JButton nextStepButton = new JButton("Next");
        nextStepButton.addActionListener(new NextActionListener());

        JButton showGuiButton = new JButton("Show GUI");
        showGuiButton.addActionListener(new ShowGUIListener());

        JButton saveImageButton = new JButton("Save as Image");
        saveImageButton.addActionListener(new SaveAsImageListener(this));

        JButton saveGifButton = new JButton("Save as Gif");
        saveGifButton.addActionListener(new SaveAsGifListener(this));

        add(previousStepButton);
        add(nextStepButton);
        add(startAnimationButton);
        add(stopAnimationButton);
        add(showGuiButton);
        add(saveImageButton);
        add(saveGifButton);
    }

}
